﻿<UserControl x:Class="ThemeMatic.Views.ThemeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             >
        <ListBox ItemsSource="{Binding AllThemes}" SelectedItem="{Binding Theme}" Margin="5" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="200" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>

                        <TextBlock Text="{Binding Name}" Margin="3" Grid.Column="1" FontSize="22" />
                        <TextBlock Text="{Binding Description}" Margin="3" Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" MaxWidth="400" />
                        <Image Source="{Binding PreviewImage}" Margin="3" Grid.RowSpan="2" Stretch="Uniform" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
            
        </ListBox>
</UserControl>
